package JoReg

const (
	EOS           = '~'
	SEMI          = ';'
	PLUS          = '+'
	NUMBER        = '0'
	CHARACTER     = 'a'
	DOT           = '.'
	ASTERISK      = '*'
	OR            = '|'
	OPTION        = '?'
	OPEN_PAREN    = '('
	CLOSE_PAREN   = ')'
	OPEN_BRACKET  = '['
	CLOSE_BRACKET = ']'
	OPEN_CURLY    = '{'
	CLOSE_CURLY   = '}'
)

type Token struct {
	token  byte
	lexeme byte
}

func NewToken(token byte, char byte) Token {
	return Token{
		token:  token,
		lexeme: char,
	}
}

func NewEosToken() Token {
	return Token{
		token:  EOS,
		lexeme: EOS,
	}
}

func NewSemiToken() Token {
	return Token{
		token:  SEMI,
		lexeme: SEMI,
	}
}

func NewNumberToken(number byte) Token {
	return Token{
		token:  NUMBER,
		lexeme: number,
	}
}

func NewCharacterToken(char byte) Token {
	return Token{
		token:  CHARACTER,
		lexeme: char,
	}
}

func NewDotToken() Token {
	return Token{
		token:  DOT,
		lexeme: DOT,
	}
}

func NewAsteriskToken() Token {
	return Token{
		token:  ASTERISK,
		lexeme: ASTERISK,
	}
}

func NewPlusToken() Token {
	return Token{
		token:  PLUS,
		lexeme: PLUS,
	}
}

func NewOrToken() Token {
	return Token{
		token:  OR,
		lexeme: OR,
	}
}

func NewOptionToken() Token {
	return Token{
		token:  OPTION,
		lexeme: OPTION,
	}
}

func NewOpenParenToken() Token {
	return Token{
		token:  OPEN_PAREN,
		lexeme: OPEN_PAREN,
	}
}

func NewCloseParenToken() Token {
	return Token{
		token:  CLOSE_PAREN,
		lexeme: CLOSE_PAREN,
	}
}

func NewOpenBracketToken() Token {
	return Token{
		token:  OPEN_BRACKET,
		lexeme: OPEN_BRACKET,
	}
}

func NewCloseBracketToken() Token {
	return Token{
		token:  CLOSE_BRACKET,
		lexeme: CLOSE_BRACKET,
	}
}

func NewOpenCurlyToken() Token {
	return Token{
		token:  OPEN_CURLY,
		lexeme: OPEN_CURLY,
	}
}

func NewCloseCurlyToken() Token {
	return Token{
		token:  CLOSE_CURLY,
		lexeme: CLOSE_CURLY,
	}
}
